package taskmaster.auth;

import java.net.URL;
import java.net.URLClassLoader;
import java.util.Map;

/**
 * Created by IntelliJ IDEA.
 * User: jhauser
 * Date: Jul 8, 2011
 * Time: 6:17:12 PM
 * To change this template use File | Settings | File Templates.
 */
public class LoginTools
{
    public static void printClassLoaderAndEnv()
    {
        ClassLoader sysClassLoader = ClassLoader.getSystemClassLoader();

        //Get the URLs
        URL[] urls = ((URLClassLoader)sysClassLoader).getURLs();

        for(int i=0; i< urls.length; i++)
        {
            System.out.println(urls[i].getFile());
        }
        Map<String,String> envMap = System.getenv();

        // print the system environment variables
        for (String key : envMap.keySet())
        {
            System.out.println(key + " = " +  envMap.get(key));
        }
    }
}
